package com.lottery.material.utils;

import com.lottery.material.common.ResultVO;

/**
 * Description：响应结果工具类
 * Created by 朱正磊 on 2019-04-03 17:06
 */
public class ResultVOUtil {

    @SuppressWarnings("unchecked")
    public static ResultVO success(Object object) {
        ResultVO ResponseResult = new ResultVO();
        ResponseResult.setData(object);
        ResponseResult.setCode(200);
        ResponseResult.setMsg("成功");
        return ResponseResult;
    }

    public static ResultVO success() {
        return success(null);
    }

    public static ResultVO error(Integer code, String msg) {
        ResultVO ResponseResult = new ResultVO();
        ResponseResult.setCode(code);
        ResponseResult.setMsg(msg);
        return ResponseResult;
    }
    
}
